{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "fc434180-13f5-4fd7-bd71-de37ee6d28f4",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\frank\\AppData\\Local\\Temp\\ipykernel_26364\\222359743.py:15: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.\n",
      "The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.\n",
      "\n",
      "For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.\n",
      "\n",
      "\n",
      "  df['Age'].fillna(df['Age'].median(), inplace=True)\n",
      "C:\\Users\\frank\\AppData\\Local\\Temp\\ipykernel_26364\\222359743.py:16: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.\n",
      "The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.\n",
      "\n",
      "For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.\n",
      "\n",
      "\n",
      "  df['Embarked'].fillna(df['Embarked'].mode()[0], inplace=True)\n",
      "C:\\Users\\frank\\AppData\\Local\\Temp\\ipykernel_26364\\222359743.py:31: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n",
      "  grouped = data.groupby(features)[target].mean()\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA/sAAAKCCAYAAACOIsmHAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlHJYcgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAToJJREFUeJzt3Qd8JGX9P/DnSq53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3YEtJg4cWK2Dm9/+9vTiBEjssMi3v/+96f777+/9TpvvPFGGj58ePrc5z632G0+//zz2eP+ne98Z5G/6+c///lsPWJ91l577fTd7353kZkl4cILL8xGzEeOHJndbyxDHJ7R1TH73X2s4m8f6/PCCy+kD33oQ9nX8ZyPdZ03b163Hq9YrrjteB7cc889S7z+kta7q9dd7EyIr+O11+LPf/5zdtk+++yz2EydAw44oPX7mLlx+umnp7XWWiu733jOx46wWbNmLfJ7cXns7LnmmmvSFltskYX8X/3qV52uzze/+c1sh8tPf/rTbj1eADQeI/sAJROB4xe/+EU66qij0t57790aJjbeeOPsc8wOeOqpp7KQGwHxoYceSr/+9a+zzzF7oH1Q3n///dMaa6yRBb4IRTF9fNlll82CTmciQG6//fbpkUceyXYkbL755lnIj9ATAXLppZfudLp8iFAegb9tcO2r6667Ll188cVZ6I/7X2eddbLH59JLL81CUdvp5H/961+zMBXHwXckHpOvfOUr2e19+ctfXuRncdmuu+6axo4dm33/pz/9Kds5En+P2Flxxx13ZAErHof4WW+17DSJcBt/z69+9avZ7UfgaxGXx7pEgI6/4SuvvJKt64477tg63T+CcjwOF110UfrhD3+YhfsWF1xwQTZC/JGPfCT7PtYjfjdC9pFHHpmF8ltvvTXbwfHSSy+ls846q/U5Fodh7LLLLq3Pk3gu3HLLLR3uVGjRk8cq1vt973tf2mqrrbKdL9dee236wQ9+kIXi+P3uiGX50Y9+1BrIO9Od9e7qdRc7uuJ1ddNNN7W+DmPHRoTtm2++ufV+XnvtteyQlbZleocffnj63e9+l/bdd9903HHHpf/85z/ZazEez7/85S+LHU4Tj3ssY8zueNvb3tbh+nz9619P3/72t7PnQh5mgQDQiWYACuGYY45p7uy/9UMPPbR5tdVWa/3+tddey6578sknL3bdGTNmLHbZBRdckF3/pptuar0sfjcuO+ywwxa57t5779281FJLLXJZ3HcsQ4uTTjop+91LL710sfuaP39+p+sYP9txxx2z311uueWaDzrooOaf//znzc8888wS17n9crcV3/fv37/5oYceWuTya665JvvZ5Zdf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FG8wEgB4R9AMhp6H9+2sz0xKTpacqsuRWf3t9ye2MGD8xC/sojhwr5AJAjwj4AFKDE76nJM7Lw3zLY39Pw3/b6kekj3K81dlgaO8R0fQDII2EfAApifnNzmjZrbpo0a06a/OacNHHmnDR11pw0v4vf6Z9SGjW4KY0b2pTGDGlKYwc3pZGDB6b+/YziA0CeCfsAUPAdADPmzMuO74+v4yOCfHzEcfjDmgYI9gBQQMI+AAAAFEzM3gMAAAAKRNgHAACAghH2AQAAoGCEfQAAACgYYR8AAAAKRtgHAACAghH2AQAAoGCEfQAAACgYYR8AAAAKRtgHAACAghH2AQAAoGCEfQAAACgYYR8AAAAKRtgHAACAghH2AQAAoGCEfQAAACgYYR8AAAAKRtgHAACAghH2AQAAoGCEfQAAACgYYR8AAAAKRtgHAACAghH2AQAAoGCEfQAAACgYYR8AAAAKRtgHAACAghH2AQAAoGCEfQAAAEjF8v8Bq3a1uyF2EqgAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Survival Probability by Class:\n",
      "Pclass\n",
      "1    0.607362\n",
      "2    0.483444\n",
      "3    0.241206\n",
      "Name: Survived, dtype: float64\n",
      "\n",
      "Survival Probability by Sex:\n",
      "Sex\n",
      "female    0.738776\n",
      "male      0.186296\n",
      "Name: Survived, dtype: float64\n",
      "\n",
      "Survival Probability by Age Group:\n",
      "AgeGroup\n",
      "Child    0.568966\n",
      "Young    0.329298\n",
      "Adult    0.421053\n",
      "Elder    0.372549\n",
      "Name: Survived, dtype: float64\n",
      "\n",
      "Survival Probability Examples:\n",
      "Passenger (Class: 1, Sex: female, Age: Young) - Survival Probability: 96.43%\n",
      "Passenger (Class: 3, Sex: male, Age: Adult) - Survival Probability: 13.11%\n",
      "Passenger (Class: 2, Sex: female, Age: Child) - Survival Probability: 100.00%\n",
      "Passenger (Class: 1, Sex: male, Age: Elder) - Survival Probability: 26.32%\n",
      "\n",
      "Model Accuracy on Test Set: 82.12%\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.preprocessing import LabelEncoder\n",
    "import matplotlib.pyplot as plt\n",
    "import networkx as nx\n",
    "\n",
    "# Load Titanic dataset\n",
    "#url = \"https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv\"\n",
    "#df = pd.read_csv(url)\n",
    "file='titanic.csv'\n",
    "df = pd.read_csv(file)\n",
    "\n",
    "# Preprocess the data\n",
    "df['Age'].fillna(df['Age'].median(), inplace=True)\n",
    "df['Embarked'].fillna(df['Embarked'].mode()[0], inplace=True)\n",
    "\n",
    "# Create age groups\n",
    "df['AgeGroup'] = pd.cut(df['Age'], bins=[0, 12, 30, 50, 100], labels=['Child', 'Young', 'Adult', 'Elder'])\n",
    "\n",
    "# Select features\n",
    "features = ['Pclass', 'Sex', 'AgeGroup', 'Survived']\n",
    "df_model = df[features].copy()\n",
    "\n",
    "# Split the data into training and testing sets\n",
    "train_df, test_df = train_test_split(df_model, test_size=0.2, random_state=42)\n",
    "\n",
    "# Calculate probabilities manually\n",
    "def calculate_conditional_probability(data, target, features):\n",
    "    \"\"\"Calculate conditional probability P(target|features)\"\"\"\n",
    "    grouped = data.groupby(features)[target].mean()\n",
    "    return grouped\n",
    "\n",
    "# Calculate individual probabilities on the training set\n",
    "P_survival_given_class = calculate_conditional_probability(train_df, 'Survived', ['Pclass'])\n",
    "P_survival_given_sex = calculate_conditional_probability(train_df, 'Survived', ['Sex'])\n",
    "P_survival_given_age = calculate_conditional_probability(train_df, 'Survived', ['AgeGroup'])\n",
    "\n",
    "# Calculate joint probabilities on the training set\n",
    "P_survival_joint = calculate_conditional_probability(train_df, 'Survived', ['Pclass', 'Sex', 'AgeGroup'])\n",
    "\n",
    "# Visualize the network structure\n",
    "G = nx.DiGraph()\n",
    "nodes = ['Pclass', 'Sex', 'AgeGroup', 'Survived']\n",
    "G.add_nodes_from(nodes)\n",
    "edges = [('Pclass', 'Survived'), ('Sex', 'Survived'), ('AgeGroup', 'Survived')]\n",
    "G.add_edges_from(edges)\n",
    "\n",
    "plt.figure(figsize=(10, 6))\n",
    "pos = {\n",
    "    'Pclass': (0, 0),\n",
    "    'Sex': (1, 0),\n",
    "    'AgeGroup': (2, 0),\n",
    "    'Survived': (1, -1)\n",
    "}\n",
    "nx.draw(G, pos, with_labels=True, node_color='lightblue', \n",
    "        node_size=2000, font_size=10, font_weight='bold',\n",
    "        arrows=True, edge_color='gray')\n",
    "plt.title('Titanic Survival Bayesian Network')\n",
    "plt.show()\n",
    "\n",
    "# Function to predict survival probability\n",
    "def predict_survival_probability(pclass, sex, age_group):\n",
    "    try:\n",
    "        prob = P_survival_joint.loc[pclass, sex, age_group]\n",
    "    except KeyError:\n",
    "        # If combination not found in data, use average of individual probabilities\n",
    "        p1 = P_survival_given_class.loc[pclass]\n",
    "        p2 = P_survival_given_sex.loc[sex]\n",
    "        p3 = P_survival_given_age.loc[age_group]\n",
    "        prob = (p1 + p2 + p3) / 3\n",
    "    return prob\n",
    "\n",
    "# Print probability tables\n",
    "print(\"\\nSurvival Probability by Class:\")\n",
    "print(P_survival_given_class)\n",
    "print(\"\\nSurvival Probability by Sex:\")\n",
    "print(P_survival_given_sex)\n",
    "print(\"\\nSurvival Probability by Age Group:\")\n",
    "print(P_survival_given_age)\n",
    "\n",
    "# Example predictions\n",
    "print(\"\\nSurvival Probability Examples:\")\n",
    "examples = [\n",
    "    (1, 'female', 'Young'),\n",
    "    (3, 'male', 'Adult'),\n",
    "    (2, 'female', 'Child'),\n",
    "    (1, 'male', 'Elder')\n",
    "]\n",
    "\n",
    "for pclass, sex, age_group in examples:\n",
    "    prob = predict_survival_probability(pclass, sex, age_group)\n",
    "    print(f\"Passenger (Class: {pclass}, Sex: {sex}, Age: {age_group}) - \"\n",
    "          f\"Survival Probability: {prob:.2%}\")\n",
    "\n",
    "# Calculate and print overall model accuracy using these probabilities\n",
    "def calculate_prediction_accuracy(test_data):\n",
    "    predictions = []\n",
    "    for _, row in test_data.iterrows():\n",
    "        prob = predict_survival_probability(row['Pclass'], row['Sex'], row['AgeGroup'])\n",
    "        pred = 1 if prob >= 0.5 else 0\n",
    "        predictions.append(pred)\n",
    "    \n",
    "    accuracy = np.mean(predictions == test_data['Survived'])\n",
    "    return accuracy\n",
    "\n",
    "# Evaluate model accuracy on the test set\n",
    "accuracy = calculate_prediction_accuracy(test_df)\n",
    "print(f\"\\nModel Accuracy on Test Set: {accuracy:.2%}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
